import React, { Component } from 'react'
import Search from './components/Search/index'
import List from './components/List/index'
// import axios from 'axios'

export default class App extends Component {

	state = {// 初始化状态
		users:[],// 用来装用户数据
		isFirst:true,// 是否第一次打开页面
		isLoading:false,// 是否加载中
		err:'',//存储错误信息
	}
	// 改变状态
	updateAppState=(tstateObj)=>{
		console.log('父级接收到',tstateObj);
this.setState(tstateObj)
	}

	render() {
		return (
			<div className="container">
	<Search updateAppState={this.updateAppState} />
		<List {...this.state} />
		
		  </div>
		)
	}
}
